﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Reflection;

using BusinessSite.Utility;
using BusinessSite.Controls;

namespace BusinessSite
{
    public partial class Default : System.Web.UI.Page
    {
   
        protected void Page_Load(object sender, EventArgs e)
        {
            WebPartsRenderer.Instance.HtmlRenderNavRight((Literal)Master.FindControl("LiteralNavLeftParts"), (Literal)Master.FindControl("LiteralNavLeftTitle"));

            switch (Request.Params["ipage"])
            {
                case "viewproduct":
                    break;

                case "supplierlist":
                    break;

                case "addproduct":
                    ((ContentPlaceHolder)Master.FindControl("PageContent")).Controls.Clear();

                    AddProduct addProduct = (AddProduct)LoadControl("~/WebParts/AddProduct.ascx");

                    ((ContentPlaceHolder)Master.FindControl("PageContent")).Controls.Add(addProduct);
                    break;

                case "addcategory":
                    break;
                case "addsupplier":
                    break;
            }   
        }
    } 
}
